Skip to content

Add fuzzing support. #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 30, 2021
Merged

Add fuzzing support. #284

merged 2 commits into from
Mar 30, 2021

Conversation

emilio
Copy link
Member

@emilio emilio commented Mar 11, 2021

No description provided.

@emilio
Copy link
Member Author

emilio commented Mar 11, 2021

r? @SimonSapin

@SimonSapin
Copy link
Member

Hey Emilio. I’m sorry but I don’t have much bandwidth available for Servo and related projects these days. If you feel that cssparser needs more reviewers I’ll trust you to designate them. I can then help with GitHub/bors/crates.io permissions.

@emilio
Copy link
Member Author

emilio commented Mar 11, 2021

Sure, sounds good, thanks Simon :)

@BorisChiou would you be able to take a look at this?

@BorisChiou
Copy link

Should be ok. I will take a look later today

}
let token_type = token.serialization_type();
if previous_token_type.needs_separator_when_before(token_type) {
serialization.push_str("/**/");
Copy link

@BorisChiou BorisChiou Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec says:

If the tokenizer preserves comments, the preserved comment should be used; otherwise, an empty comment (/**/) must be inserted.
https://drafts.csswg.org/css-syntax/#serialization

So we always insert an empty comment here because we don't support preserving_comments now. Ya, should be fine because you mentioned the browsers don't preserve coments now.

Copy link

@BorisChiou BorisChiou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this fuzzing support looks like we just parse the input and serialize it as a well-formatted string? Not sure about the use case because there is no example for now. However, the overall logic looks fine to me.

@jrmuizel
Copy link

Can this land now?

@emilio
Copy link
Member Author

emilio commented Mar 30, 2021

@bors-servo r=BorisChiou

@bors-servo
Copy link
Contributor

📌 Commit d2dc268 has been approved by BorisChiou

@bors-servo
Copy link
Contributor

⌛ Testing commit d2dc268 with merge 2bb4986...

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-travis
Approved by: BorisChiou
Pushing 2bb4986 to master...

@bors-servo bors-servo merged commit 2bb4986 into master Mar 30, 2021
@emilio emilio deleted the fuzzing branch September 3, 2021 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants